package edu.xidian.forum.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;


@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Accessors(chain = true)
public class LoginDto {

    @NotEmpty
    @Length(min = 2, max = 15, message = "账号长度在2-15")
    private String name;

    @NotEmpty
    @Length(min = 6, max = 20, message = "密码长度在6-20")
    private String password;
}
